<script setup lang="ts">
import { ref } from 'vue'
import axios from 'axios'

let sum = ref(0)

// 由于使用了setup语法糖，底层帮助写了async
let {
  data: { content },
} = await axios.get('https://v1.jinrishici.com/all.json')
console.log(content)
</script>

<template>
  <div class="child">
    <h1>我是Child组件</h1>
    <p>当前求和为：{{ sum }}</p>
  </div>
</template>

<style scoped>
.child {
  background-color: #dab649;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 0 10px;
}
</style>
